package cn.topcodes.tcsf.app.domain.api;

import cn.topcodes.tcsf.app.domain.form.AppClientInfo;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * Created by Unicorn on 2017/7/26.
 */
@Data
public class ReqLogin implements Serializable {

    @NotBlank(message = "please enter user name")
    @Length(min = 3, max = 20, message = "User name length is 3 ~ 20 characters")
    private String username;

    @NotBlank(message = "Please enter the password")
    @Length(min = 6, max = 40, message = "Password length is 6 ~ 40 characters")
    private String password;

    /**
     * 验证码
     */
    private String captcha;

    @NotNull(message = "App client information can not be null")
    private AppClientInfo appClient;
}
